package com.example.mvpdemo.mvp1;

import com.example.mvpdemo.net.NetworkCallback;

public class LoginPresenter {
    private LoginModel loginModel;
    private ILoginView loginView;

    public LoginPresenter( ILoginView loginView) {
            this.loginModel=new LoginModel();
            this.loginView=loginView;
    }

    public void login(String username,String psd){
        loginModel.login(username, psd, new NetworkCallback() {
            @Override
            public void result(String result) {
                if (loginView!=null)
                    loginView.onLoginResult(result);
            }
        });
    }


}
